package dao

import (
	"github.com/go-programming-tour-book/blog-service/internal/model"
)

func (d *Dao) Login(email, password string) (model.User, error) {
	user := model.User{Email: email, Password: password}
	return user.Login(d.engine)
}

func (d *Dao) Register(name, email, password string) (model.User, error) {
	user := model.User{Name: name, Email: email, Password: password}
	return user.Register(d.engine)
}
